
*****************************************************************************
*
* Readme file for
*
* DOES THE EARLY BIRD ALWAYS GET THE WORM? FIRST ROUND ADVANTAGES AND SECOND ROUND VICTORIES IN LATIN AMERICA
*
* By Adrián Lucardi, Juan Pablo Micozzi and Agustín Vallejo
*
* Electoral Studies, 81, 2023
*
* January 2023
*
*****************************************************************************


*****************************************************************************
* NOTE
*****************************************************************************

- All the analyses were carried out using R version 4.0.5 (2021-03-31) -- "Shake and Throw"
- The script was run on a Mac platform
- To replicate the results, you first need to install and call the following packages and dependencies in R:
install.packages ("pacman")
install.packages ("dplyr")
install.packages ("ggcorrplot")
install.packages ("ggplot2")
install.packages ("ggpmisc")
install.packages ("ggthemes")
install.packages ("haven")
install.packages ("lfe")
install.packages ("lpdensity")
install.packages ("lubridate")
install.packages ("maps")
install.packages ("RcppRoll")
install.packages ("rdd")
install.packages ("rddensity")
install.packages ("rdlocrand")
install.packages ("rdpower")
install.packages ("rdrobust")
install.packages ("readxl")
install.packages ("sf")
install.packages ("tidyr")
install.packages ("tidyverse")
install.packages ("viridis")
install.packages ("wesanderson")
install.packages ("xtable")



*****************************************************************************
* REPLICATION FILES
*****************************************************************************

1. "Runoff_JELS_Replication.R": script used to reproduce the tables and figures reported in the paper and the appendix. This also produces the LaTeX code for the tables, and exports them to the "tables" folder.

2. "Second rounds - Full dataset 2022-10-12.csv": Main dataset used in the analysis. Constructed by the authors using the sources listed in Appendix A. The unit of observation is the candidate in an executive election. Note that to the extent possible, all candidates running in the election are included, even if they were eliminated in the first round.

3. "NELDA v6.0.xls": version 6.0 of the National Elections across Democracy and Autocracy (NELDA) dataset (Hyde and Marinov 2012; https://nelda.co/). We use this data to get the full sample of presidential elections 1945-2020.

4. "Country_Year_V-Dem_Core_STATA_v11.1.zip": version v.11.1 of the core V-Dem data (https://v-dem.net/), which we use to identify the subsample of democratic presidential elections. Note that the uncompressed .dta file weights 400MB.

